package com.vita.Exception;

public class IcoCheck {

    /**
     * 输入为 ture 跳过，false抛出异常
     */
    public static void isTrueContinue(boolean trueExpect,String falseMsg){
        if(!trueExpect){
            throw new IcoException(falseMsg);
        }
    }

    
    /**
     * 输入为 false 跳过，true抛出异常
     */
    public static void isFalseContinue(boolean falseExpect,String trueMsg){
        isTrueContinue(!falseExpect,trueMsg);
    }

    /**
     * 输入为 false 抛出异常，true跳过
     */
    public static void isFalseException(boolean falseExpect,String falseMsg){
        isTrueContinue(falseExpect,falseMsg);
    }

        /**
     * 输入为 true 抛出异常，false跳过
     */
    public static void isTrueException(boolean trueExpect,String trueMsg){
        isTrueContinue(!trueExpect,trueMsg);
    }    
}
